Vocabulary:
-----------
Meta: A map file is made up of sounds, models, bitmaps, and many other types of meta. You can think of a meta as a file. Such as a .wav is a sound formatted for the computer, a snd! meta is a sound file for Halo 2 on the Xbox. A map file is made of several thousand of these  different meta types.

Tag Type: This is the type of meta, such as snd! for sound, mode for model, etc.  

Dependency: A meta has may or may not have dependencies. They link the meta to a different meta. For example: An hlmt meta references the 3rd person model for an object as well as other things like the collision model(coll) or animation trigger(jmad). These dependencies can be changed to edit an object.

Lone ID: Lone ID's are just like dependencies. They may or may not exist in a meta,reference another meta, and can be swapped as for another lone ID as well.

Model: The 3d representation of a character, weapon, piece of scenery, etc.

Offset: A location in the map file.

Raw Data: Raw data is information that the meta relies on but it located outside of the meta. Only certain metas rely on raw data such as models, sounds, and bitmaps.

-----------

Foreword: H2x is a program developed programmed by Daniel Popkin(pokecancer) for those who desire to modify Halo 2 map files. The main purpose of this program was to import model's from single player to multiplayer halo maps which it does as well as as model exporting(to .obj) and model viewing. H2x allows you access to the meta's to modify them and displays it in a user-friendly format.

-----------

Requirements: A PC, Microsoft .NET Framework Version 1.1 Redistributable Package or newer, DirectX 9 or newer

-----------

Editing Dependencies:

1. Run h2x and open a map file that you would like to edit.

2. A list of tag types and metas will be generated.

3. Choose a meta to edit. For example: If you wanted to change the projectile for a shotgun, you would find the weap category and choose the objects\weapons\rifle\shotgun\shotgun meta.

4. Click the dependency button to load the dependencies list. 

5. Find the dependency you would like to change. In this case, we will change the shotgun proj so select that.

6. Underneath the dependency list, you will see a pull down box with tag types on the left and another one with meta names for the selected tag type right after. Scroll down the list of meta names and choose a replacement. In this case we will choose the rocket launcher projectile(objects\weapons\support_high\rocket_launcher\projectiles\rocket) and click the swap button to change the dependency. You can see the change is relefected in the dependency list.

7. Now, we want to sign the map file. Click on tools in the menu at the top and click sign. We are ready to upload our map and see our shotgun shoot rockets.

Tip: You can select multiple depedencies and swap them at the same time by selecting one dependency and then holding shift or control and selecting another dependency.

-----------

Model Importing, Exporting, and Viewing:

1. Run h2x and open a map file with a model you would like to move to another level. We will use 06b_floodzone.map.

2. A list of tag types and metas will be generated.

3. Choose a mode meta for the model you want to save. For example: If you wanted to save the jackal shield, you would find the weap category and select the objects\weapons\melee\jackal_shield\jackal_shield meta.

4. Right click the dependency list and the model panel will show up. Click view to look at the model. The controls to navigate the model viewer are A, S, D, W, Z, X, Left Control Button, and Space Bar. If you would like to export the model to an .obj format to view and edit in a 3d editing program like Milkshape, there is a box on the right side of the model panel that has a list of all the different parts of the model and their level of detail. 5 is the highest level, hence 0 is the worst quality. 

5. Now, there are a couple of things that we need to know about our model before we go ahead and save. First, note that the box with the "Save Changes" button, has a size box as well. This is the meta size. Our meta size for the jackal shield is 932 bytes. We will need to find a meta of equal or larger size to inject our model into when we ready. Secondly, when you click on a model, a box appears on the left hand side of h2x containing the raw data size and specifying if that raw data is external. External raw data is raw data that is contained outside of the map file within a shared map file. There are 3 shared map files that different maps take information from. These are shared.map, single_player_shared.map, and mainmenu.map. This is very useful because if we have a model that has external raw data, we do not have to import the raw data , we can just reference the shared map that the data is in. If it is not external, the box will say "External: False". When this is the case, we have to keep in mind that this model is internal. If it is internal, take note of the raw data size. We will have to inject over something internal with at least that much raw data. Our jackal shield has external raw data in the single_player_shared.map. We have chosen our model, so click "Save Meta" and choose a spot to save at.

6. Open the map file that we will be importing to. I am using Zanzibar.

7. Since our model references raw data externally, we can overwrite just about any meta we want to import our model as long as it's big enough to fit our other meta. We want to find any unused meta that we can. I like to use coll metas for vehicles that aren't in the map file by default. For this example, I will use the coll for objects\vehicles\scorpion\turrets\cannon\cannon which has a meta size of 8644 bytes, which is obviously big enough to fit our other meta. We are ready to inject our model so click inject meta and locate the mode meta you saved before. H2x will ask if you want to reference the external data, click yes. IMPORTANT: We can only inject into other tag types if the model we are importing had external raw data or if the model was saved from one of the three  shared maps. If this is not the case, we must find another mode meta that is internal and has enough raw data for us to overwrite.

8. Click the "Save Changes" button. This changes the name of the meta we overwrote, the tag type and it also changes the meta size to the correct size of the meta we are importing. 

9. Go to the mode tag type category and select the objects\weapons\melee\jackal_shield\jackal_shield meta and view its dependencies. These dependencies link the model to it's shaders. The shaders link to bitmaps. Choose some shaders to use and swap the dependencies. If the shader that the model previously relied on is in the new map, h2x will automatically link the dependency for it.

10. Now, we want to link it to an object that is already in the map file. We will use the shotgun. If you open the weap meta for the shotgun and look at the lone IDs, you will see a mode lone id. Swap that with our objects\weapons\melee\jackal_shield\jackal_shield mode meta. There is also another dependency we have to edit. First, we look at the weap meta's dependencies. There is a hlmt dependency named objects\weapons\rifle\shotgun\shotgun. So, we follow that dependency and look at it's meta. There will be a mode dependency there too. Change that to our objects\weapons\melee\jackal_shield\jackal_shield mode meta too.

11. Now, we want to sign the map file. Click on tools in the menu at the top and click sign.  We're ready to upload our map file and view our model. Walk over to where the shotgun spawns in the level and there's our jackal shield! 